@layout("/common/_curd/_container.html"){

<style>
	.outer{
		display: flex;
		flex-wrap: wrap;
	}
	.inlist{
		width: 100%;
		margin-top: 15px;
	}
</style>
<input type="hidden" name="sn_order_paylog.order_id" id="sn_order_paylog" value="${orderId}">
<!-- 表单 -->

<div class="outer">
	<div class="inlist">
		<label class="col-sm-2 control-label no-padding-right"> 付款项目描述 </label>
		<div class="col-sm-9">
			<input type="text" id="_pay_content" name="sn_order_paylog.pay_content"  placeholder="请填写付款项目描述" class="form-control">
		</div>
	</div>
	<div class="inlist">
		<label class="col-sm-2 control-label no-padding-right"> 单位 </label>
		<div class="col-sm-9">
			<input type="text" id="_unit" name="sn_order_paylog.unit"  placeholder="请填写单位" class="form-control">
		</div>
	</div>
	<div class="inlist">
		<label class="col-sm-2 control-label no-padding-right"> 数量 </label>
		<div class="col-sm-9">
			<input type="text" id="_num" name="sn_order_paylog.num"  placeholder="请填写数量" class="form-control">
		</div>
	</div>
	<div class="inlist">
		<label class="col-sm-2 control-label no-padding-right"> 金额（元） </label>
		<div class="col-sm-9">
			<input type="text" id="_price" name="sn_order_paylog.price" placeholder="请填写金额" class="form-control">
		</div>
	</div>
	<div class="clearfix form-actions center" style="width:100%;margin-top:15px;margin-bottom:5px;">
		<div class="col-md-offset-1 col-md-10">
			<button class="btn btn-info" type="submit" id="btn_save1">
				<i class="ace-icon fa fa-check bigger-110"></i>
				新增
			</button>

			&nbsp; &nbsp; &nbsp;
			<button class="btn" type="button" id="btn_close">
				<i class="ace-icon fa fa-close bigger-110"></i>
				关闭
			</button>
		</div>
	</div>
</div>

<script>
	$(function () {
		$("#btn_close").on("click",function () {
			var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
			parent.layer.close(index); //再执行关闭
		})
		$("#btn_save1").on("click",function () {
			var ajaxURL = '/${code}/save';
			var ajaxData = {
				"sn_order_paylog.pay_content":$("#_pay_content").val(),
				"sn_order_paylog.num":$("#_num").val(),
				"sn_order_paylog.unit":$("#_unit").val(),
				"sn_order_paylog.price":$("#_price").val(),
				"sn_order_paylog.order_id":${orderId}
			}
			$.post(ajaxURL,ajaxData,function (res) {
				if(res["success"]){
					var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
					parent.layer.close(index); //再执行关闭
				}
			});

		})
	})
</script>

@}
